package org.honeynet.hbstats.common;

import javax.annotation.Resource;
import javax.enterprise.inject.Produces;
import javax.inject.Qualifier;
import javax.sql.DataSource;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

public class Resources {

    @Qualifier
    @Target({METHOD, FIELD, PARAMETER})
    @Retention(RUNTIME)
    public static @interface Hbbackend {};

    @Qualifier
    @Target({METHOD, FIELD, PARAMETER})
    @Retention(RUNTIME)
    public static @interface Infinidb {};


    @Produces @Resource(mappedName="jdbc/hbbackend_stats")
    @Resources.Hbbackend DataSource db_hbbackend;

    @Produces @Resource(mappedName="jdbc/infinidb")
    @Resources.Infinidb DataSource db_infinidb;
}

